<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include  file="header.jsp" %>
<%@ page import="com.stark.blog.model.*" %>
<%@ page import="com.stark.blog.*" %>
<% 
ArrayList<Blog> list=(ArrayList<Blog>)request.getAttribute("blogList");

%>
<h2>博文管理</h2>

<table id="tab">
<tr>
   <th>主题</th>
   <th>分类</th>
   <th>日期</th>
   <th>操作</th>
</tr>
<% 
  for(Blog b:list){
	  %>
		<tr>
	       <td><%=b.getTitle() %></td>
		   <td>Java Web</td>
		   <td><%=DateFormatUtil.getSimpleDateFormat().format(b.getCreatedTime())%> </td>
		   <td align="center"><a href="/BlogSystem/BlogServlet?method=getBlogById&id=<%=b.getId() %>" ><img src="/BlogSystem/admin/images/edit.gif" border="0" alt="编辑"></a><a href="#"><img src="/BlogSystem/admin/images/delete.gif" border="0" alt="删除"></a></td>    
		</tr>	
		<%} %>	

	</table>
<%@ include  file="footer.jsp" %>